home *** CD-ROM | disk | FTP | other *** search
/ PC Graphics Unleashed / PC Graphics Unleashed.iso / ch12 / blobdraw.doc next >
Text File  |  1994-05-09  |  9KB  |  233 lines

  1.  
  2.  
  3.  
  4.                               BLOBDRAW  V1.0
  5.  
  6.                                  5/9/94
  7.  
  8.                   Copyright (C) 1994, James P. Hawkins
  9.                              18 Marlpit Place 
  10.                            Middletown, NJ 07748
  11.                             All rights reserved
  12.  
  13.  
  14.  
  15.  
  16. I. INTRODUCTION
  17.  
  18.     BLOBDRAW is a freeware utility for use with Autodesk Animator Pro
  19.     software.  It is written in Animator Pro's Poco programming language.
  20.     BLOBDRAW is a 2D BLOB modeling program which allows the user to
  21.     create animated or non-animated blob patterns.  I was inspired to
  22.     write this program after reading the excellent article on blobs listed
  23.     below by Alfonso Hermida, who was kind enough to supply me with
  24.     sample C code for generating blobs.
  25.  
  26.     Blobs are liquid-like entities which can either "attract" or "repel"
  27.     each other in accordance with their "strength" and proximity to
  28.     each other.  Blobs are becoming increasingly popular in modeling
  29.     natural shapes and organic modeling such as human forms.  Although
  30.     blobs can be many shapes, this program uses circular blobs only.
  31.     Blobs operate on an inverse square law much like gravity.
  32.  
  33.     
  34. II. REFERENCES
  35.  
  36.     "3D Artist Issue #14" PP 41, 42 Article "Introduction to Blobs"
  37.     By Alfonso Hermida 
  38.  
  39.     "Computer Graphics World" May 1993 PP 27-32, "The Magic of Metaballs"
  40.     by Gaye L. Graves
  41.  
  42.  
  43. III. DISCLAIMER
  44.  
  45.     The author makes no representations or warranties with respect to this
  46.     software or documentation, and specifically disclaims any express or
  47.     implied warranties of merchantablilty or fitness for any purpose.
  48.     Further, he reserves the right to make changes to any and all parts of
  49.     the software, at any time, without obligation to notify any person or
  50.     organizations.  The author will not be liable for any special,
  51.     incidental, consequential, indirect or similar damages due to loss of
  52.     data or any other reason, even if advised of the possibility of such
  53.     damages.  In no event shall liability for any damages ever exceed the
  54.     price paid for the license to use the software, regardless of the form
  55.     of the claim.
  56.  
  57.  
  58. IV. SUPPORT
  59.  
  60.     Please send requests, bug reports, comments to:
  61.  
  62.         James P. Hawkins
  63.         18 Marlpit Place
  64.         Middletown, NJ 07748
  65.  
  66.         or
  67.  
  68.         Jim Hawkins at Compuserve 76520,3356
  69.  
  70.  
  71. V. TERMS
  72.  
  73.     Feel free to re-upload this program to other bulletin board systems
  74.     in its original, unmodified form.  You may not repackage it with
  75.     other software.  You may not repackage it with your own tutorial.
  76.  
  77.     If you want to include this on a disk along with any magazine, book,
  78.     hardware product, or other software product, please obtain my permission
  79.     in writing.
  80.  
  81.  
  82. VI. REGISTRATION
  83.  
  84.     BLOBDRAW is a freeware program, but not free for resale.  
  85.  
  86.         James P. Hawkins
  87.         18 Marlpit Place
  88.         Middletown, NJ 07748
  89.  
  90.  
  91. VII. FILES INCLUDED
  92.  
  93.     BLOBDRAW.POC            The POCO program
  94.     BLOBDRAW.DOC            This document
  95.  
  96. VIII. GETTING STARTED
  97.  
  98.     Copy the file BLOBDRAW.POC into your \ANI\RESOURCE directory.
  99.     Start Animator Pro.  From the FLIC pulldown, choose RESET.
  100.     Create at least 20 frames, then from the POCO pulldown, choose
  101.     BLOBDRAW.  Then, from the popup, choose DEMO.
  102.  
  103.     BLOBDRAW will work with Animator Pro set to any image size, but I
  104.     recommend most experimentation at 320X200.
  105.  
  106.  
  107. IX. MAIN MENU
  108.  
  109.     When BLOBDRAW is invoked, the MAIN MENU appears:
  110.  
  111.         1 INPUT BLOB DATA
  112.         0 DEMO
  113.  
  114.     0. DEMO
  115.  
  116.         Demonstration animation, a single moving blob shoots through
  117.         the area between 3 blob pairs.
  118.  
  119.     1. CREATE BLOB SCENE
  120.  
  121.         When this option is selected, a new menu pops up allowing the
  122.         user to set up his/her own blob scene through graphic input
  123.         and parameter settings.
  124.  
  125. X. BLOB DATA ENTRY
  126.  
  127.     When "CREATE BLOB SCENE" is selected from the main menu, the
  128.     "BLOB DATA ENTRY" menu pops up with the following choices:
  129.  
  130.         1 Add a Blob
  131.         2 Set Theshold Index (default = 5)
  132.         3 Set Color Mode
  133.         4 Set Palette to Grayscale
  134.         0 Go!
  135.  
  136.     1. ADD A BLOB
  137.  
  138.         When this option is selected, the program is waits for the user
  139.         to place a center point (x, y coordinate) for a blob with the mouse.
  140.         Upon placement of the center point, move the mouse till the
  141.         rubber circle represents the size blob you desire, then click again.
  142.         A circle will be painted on the screen and a rubber line will
  143.         form at the center of the circle for placement of the animation
  144.         path for the blob.  If the right mouse button is clicked, the
  145.         line will disappear and a dot will be placed at the center of the
  146.         circle, indicating that it is a stationary blob.  If the rubber
  147.         line is moved so that the other end is at the destination, clicking
  148.         the left mouse button will draw a line representing the motion path
  149.         of the blob.  After entering the size and path graphically, a data
  150.         entry slider will appear called "SET BLOB STRENGTH INDEX," at which
  151.         point the user can select a new index, ranging from -10 to 10,
  152.         or simply click "OK", accepting the default of 10.  The actual
  153.         index is 1/10th the slider value, hence, true strength values
  154.         for blobs range from -1.0 to 1.0.
  155.  
  156.         A negative blob will be invisible, but will have a repulsion effect
  157.         on other blobs.
  158.         
  159.         At this point, the BLOB DATA ENTRY menu will reappear.
  160.  
  161.         Selecting "Add a Blob" will allow entry of another blob and motion
  162.         path.  This may be continued until up to 100 blobs are entered.
  163.  
  164.     2.    SET THRESHOLD INDEX
  165.  
  166.         Selecting this option causes a slider to be displayed, where the
  167.         user can select a number from 0 to 10.  Each number is an INDEX
  168.         which represents a threshold value, which is 1/10th the value
  169.         of the index.  (Animator Pro allows only integer slider values.)
  170.         Therefore, selecting 3 sets the threshold to 0.3.
  171.  
  172.         The threshold value is the minimum value that the combined
  173.         summed strengths of blobs must exceed at a given x, y value,
  174.         to display a pixel at that point.
  175.  
  176.         The default setting is 5 (threshold = 0.5).
  177.  
  178.     3.  SET COLOR MODE
  179.  
  180.         A numerical slider appears.  Giving the user 5 different methods
  181.         of determining how pixels are colored as follows:
  182.  
  183.             mode 0
  184.               Uses the currently selected color to paint solid, single
  185.               color blobs.
  186.  
  187.             mode 1:
  188.               Exponential function of total calculated strength according
  189.               to:  color = 255 * (1 - exp(-t)).
  190.               This results in the most pleasing gradient coloring if
  191.               the palette is a gradient.  The blobs are never flat-topped.
  192.               This is the DEFAULT.
  193.    
  194.             mode 2:
  195.               Exponential function of total calculated strength according
  196.               to: color = 255 * exp(-t).
  197.               This results in the blobs having the HIGHEST color index
  198.               values on the outer edges.
  199.               
  200.             mode 3:
  201.               Coloring as a linear function of strength.  When blobs become
  202.               closely clustered, adding up to high central strength values,
  203.               flat tops occur, giving the appearance that the blobs are
  204.               liquid droplets whose tops are flattened against a flat glass
  205.               cover.  
  206.         mode 4:
  207.               Coloring as a linear function of strength without flat top.
  208.               The maximum possible strength is precalculated and introduced
  209.               into the gradient.  With a gradient, the more separate blobs
  210.               there are, the darker they ALL are, but if they come together,
  211.               they only reach a maximum color index of 255.
  212.  
  213.                 color = ((int)((t/max_strength) * 255) % 255);
  214.  
  215.     4.  SET PALETTE TO GRAYSCALE
  216.  
  217.         Sets the palette to grayscale gradient for your convenience.
  218.  
  219.  
  220.  
  221. XI. TIPS
  222.  
  223.     1.  Use Grid... mode for more accurate placement of blobs.
  224.  
  225.     2.  Draw guidelines before starting BLOBDRAW to help you layout
  226.         placements and paths.  BLOBDRAW will erase the guidelines when
  227.         rendering commences.
  228.  
  229.     3.  Create often-used guideline grids and save them in picture files
  230.         so that they may be conveniently reloaded.
  231.  
  232.  
  233.